package com.rxyb.hongyu.gateway.controller;


import com.rxyb.core.respone.IBaseCode;
import com.rxyb.core.respone.R;
import com.rxyb.hongyu.gateway.dto.push.*;
import com.rxyb.hongyu.service.ThirdHongyuPushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 鸿宇推送的记录 前端控制器
 * </p>
 *
 * @author DUYH
 * @since 2020-06-09
 */
@RestController
@RequestMapping(value = "/hongyu/push", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class ThirdHongyuPushController {

    @Autowired
    private ThirdHongyuPushService thirdHongyuPushService;

    /**
     * 自动生成检验流水
     *
     * @author duyh
     */
    @PostMapping(value = "F20A02", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<F20A02Rsp> f20A02(@Validated @RequestBody F20A02Req f20A02Req) {
        return thirdHongyuPushService.f20A02(f20A02Req);
    }

    /**
     * 检验流水结果查询
     *
     * @author duyh
     */
    @PostMapping(value = "F20A03", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<F20A03Rsp> f20A03(@Validated @RequestBody F20A03Req f20A03Req) {
        return thirdHongyuPushService.f20A03(f20A03Req);
    }

    /**
     * 预约信息传递
     *
     * @author duyh
     */
    @PostMapping(value = "F20A04", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<IBaseCode> f20A04(@Validated @RequestBody F20A04Req f20A04Req) {
        return thirdHongyuPushService.f20A04(f20A04Req);
    }

    /**
     * 流水退办
     *
     * @author duyh
     */
    @PostMapping(value = "F20A05", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<IBaseCode> f20A05(@Validated @RequestBody F20A05Req f20A05Req) {
        return thirdHongyuPushService.f20A05(f20A05Req);
    }

    /**
     * 证件采集
     *
     * @author duyh
     */
    @PostMapping(value = "F20A06", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<IBaseCode> f20A06(@Validated @RequestBody F20A06Req f20A06Req) {
        return thirdHongyuPushService.f20A06(f20A06Req);
    }

}
